<!--Login panel-->
<div id="login_panel" class="reveal-modal">
    <div class="row">
        <div class="twelve columns">
            <h5 class="pink-text"><i class="icon-user icon-large"></i> INGRESE A SU CUENTA <span class="subheader right small-link"><a href="javascript:void(0);" data-reveal-id="register_panel" class="radius secondary small button">CREAR NUEVA CUENTA</a></span></h5>
        </div>
        <form id="login_form_panel" action="{{ path('fos_user_security_check') }}" method="POST" class="clearfix" onsubmit="return loginPanel();">
            <input type="hidden" name="_csrf_token" value="{{ fos_csrf_provider.generateCsrfToken('authenticate') }}" />
			<div class="twelve columns alert-box alert errors"></div>
            <div class="six columns">
                <input type="text" name="_username" class="inputbox" placeholder="Usuario" required>
            </div>
            <div class="six columns">
                <input type="password" name="_password" class="inputbox" placeholder="Password" required>
            </div>
            <p class="twelve columns">
                <small><i class="icon-lock"></i>
                    Su <a href="{{ url('privacidad')}}">privacidad</a> es importante para nosotros y sus datos nunca los venderemos.
                </small>
            </p>
            <div class="twelve columns">
                <button id="btn_login_panel" type="submit" name="submit" class="radius secondary button"><i class="icon-unlock"></i> &nbsp;INGRESAR</button> &nbsp;
				<a href="javascript:loginFace();" class="radius button facebook"><i class="icon-facebook-sign"></i> &nbsp;INGRESAR CON Facebook</a>
            </div>
        </form>
        <div class="twelve columns"><hr>
            <ul class="inline-list">
                <li><small><a href="javascript:void(0);" data-reveal-id="forgot_panel">OLVIDÓ SU CONTRASEÑA?</a></small></li>
            </ul>
        </div>
    </div><!--end row-->
    <a href="javascript:void(0);" class="close-reveal-modal">×</a>
</div><!--end login panel-->


<script type="text/javascript">
	function loginFace()
	{
		FB.login(function(response) {
			if (response.authResponse) {
				goLogIn();
			}
		}, {scope: 'email, user_birthday, user_location, read_stream'});
	}
	
    function goLogIn(){
        window.location.href = "{{ path('_security_check') }}";
    }

</script>
